<template>
  <div>
    <div class="list_body" v-for="(item,index) in list" :key="index" @click="goeat">
      <div style="width:20%">
        <img :src="item.picUrl" width="100px" />
      </div>
      <div class="list_items">
        <div>{{item.shopName}}</div>
        <!-- <div>{{item.averagePriceTip}}</div> -->
        <div class="items_bottom">
          <span>{{item.averagePriceTip}}</span>
          <span>{{item.deliveryTimeTip}}</span>
          <span>{{item.monthSalesTip}}</span>
        </div>
      </div>
    </div>
    <div style="height:60px"></div>
  </div>
</template>

<script>
export default {
  data() {
    return {
      list: [],
    };
  },
  mounted() {
    this.$axios.get("/listData.json").then((res) => {
      console.log(res.data.data.shopList);
      this.list = res.data.data.shopList
    });
  },
  methods:{
    goeat(){
        this.$router.push('/eatList')
    }
  }
};
</script>

<style scoped>
.list_body {
  width: 100%;
  height: 95px;
  display: flex;
  justify-content: space-between;
  box-sizing: border-box;
  padding: 0 10px;
  border-bottom: 1px solid #eee;
  margin: 10px 0;
}
.list_items {
  width: 100%;
  height: 80px;
  margin-left: 40px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.items_bottom {
  width: 100%;
  display: flex;
  justify-content: space-between;
}
</style>